package ${codeMapModel.serviceImplNameSpace};

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.org.template.component.repository.IBaseDao;
import cn.org.template.component.service.BaseServiceImpl;
import ${codeMapModel.modelNameSpace}.${codeMapModel.modelName};
import ${codeMapModel.serviceNameSpace}.I${codeMapModel.modelName}Service;
import ${codeMapModel.daoNameSpace}.I${codeMapModel.modelName}Dao;

/**
 * <b>description</b>：${codeMapModel.desc}业务实现<br>
 * <b>time</b>：${data} <br>
 * <b>author</b>：  ${codeMapModel.author}
 */
@Service("${codeMapModel.lmodelName}Service")
public class ${codeMapModel.modelName}ServiceImpl extends BaseServiceImpl<${codeMapModel.modelName}> implements I${codeMapModel.modelName}Service {

	@Autowired(required=false)
	private I${codeMapModel.modelName}Dao ${codeMapModel.lmodelName}Dao;

	@Override
	public IBaseDao<${codeMapModel.modelName}> getBaseDao() {
		return this.${codeMapModel.lmodelName}Dao;
	}
	
	/**
	 * 以下代码纯属为了测试事务回滚.经测试可以回滚,请放心使用我的快速开发平台 
	 */
	//	@Override
	//	public int updateById(Company model) throws Exception
	//	{
	//		AttrKey modelb = new AttrKey();
	//      设置重复的Id	
	//		modelb.setId(10L);
	//		modelb.setAttr_key("k1");
	//		attrKeyDao.insertOne(modelb);
	//		return getBaseDao().updateById(model);
	//	}

}